#pragma once

#include "render/Framebuffer.h"

namespace Cogs{
	class OpenGLFramebuffer :public Framebuffer {
	public:
		OpenGLFramebuffer(uint32_t width, uint32_t height);
		~OpenGLFramebuffer();

		void Bind() override;
		void Unbind() override;
		void Resize(uint32_t width, uint32_t height) override;
		uint32_t GetColorAttachmentID() const override;

	private:
		void Invalidate();

		uint32_t m_RendererID = 0;
		uint32_t m_ColorAttachment = 0;
		uint32_t m_DepthAttachment = 0;

		uint32_t m_Width, m_Height;
	};
}